package com.system.response.mail;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Classname Mail
 * @Date 2023/8/9 9:38
 * @Created ZFC
 */
@Data
@ToString
@Api("发送邮件dto")
public class MailDtoResponse implements Serializable {

    @ApiModelProperty("主题")
    @NotNull(message = "主题不能为空")
    @Length(max = 50,message = "主题内容过长")
    private String subject;

    @ApiModelProperty("收件人【只能一个】")
    @NotNull(message = "收件人邮箱不能为空")
    @Length(max = 50,message = "主题内容过长")
    private String to;

    @ApiModelProperty("邮件内容")
    @NotNull(message = "邮件内容不能为空")
    @Length(max = 2000,message = "邮件内容不能超过2000个字符")
    private String text;
}
